 subroutine printdnrm2_d(title, array, iop) 
!
use mod_iop
use mod_size
use mod_orbit
use mod_ioff 
 implicit none
 character*(*), intent(in) :: title
 real*4, intent(in),managed :: array(*)
 real*8, external :: nrm2so, dnrm2
 real*8 f1, f2
 integer, intent(in) :: iop 
 f1 = 2.d0
 f2 = sqrt(2.d0)
 if(iop==11) then 
    write(6,*) title,'VV' 
    write(6,*) 'AA', nrm2so(nifvvaa, array(ifvv(1)), 1)
    write(6,*) 'BB', nrm2so(nifvvbb, array(ifvv(2)), 1)
 elseif(iop==22) then 
    write(6,*) title,'VO'
    write(6,*) 'AA', nrm2so(nifvoaa, array(ifvo(1)), 1)
    write(6,*) 'BB', nrm2so(nifvobb, array(ifvo(2)), 1)
 elseif(iop==33) then 
    write(6,*) title,'OO'
    write(6,*) 'AA', nrm2so(nifooaa, array(ifoo(1)), 1)
    write(6,*) 'BB', nrm2so(nifoobb, array(ifoo(2)), 1)
 elseif(iop==1) then 
    write(6,*) title,'OOOO'
    write(6,*) 'AAAA',nrm2so(nioi11, array(ioi1(1)), 1)*f1
    write(6,*) 'ABAB',nrm2so(nioi12, array(ioi1(2)), 1)
    write(6,*) 'BBBB',nrm2so(nioi13, array(ioi1(3)), 1)*f1
 elseif(iop==2) then 
    write(6,*) title,'OOOV'
    write(6,*) 'AAAA', nrm2so(nioi21, array(ioi2(1)), 1)*f2
    write(6,*) 'ABAB', nrm2so(nioi22, array(ioi2(2)), 1)
    write(6,*) 'BBBB', nrm2so(nioi23, array(ioi2(3)), 1)*f2
    write(6,*) 'BABA', nrm2so(nioi24, array(ioi2(4)), 1)
 elseif(iop==3) then 
    write(6,*) title,'VVOO'
    write(6,*) 'AAAA', nrm2so(nioi31, array(ioi3(1)), 1)*f1
    write(6,*) 'ABAB', nrm2so(nioi32, array(ioi3(2)), 1)
    write(6,*) 'BBBB', nrm2so(nioi33, array(ioi3(3)), 1)*f1
 elseif(iop==4) then           
    write(6,*) title,'VVOO'    
    write(6,*) 'AAAA', nrm2so(nioi41, array(ioi4(1)), 1)
    write(6,*) 'ABAB', nrm2so(nioi42, array(ioi4(2)), 1)
    write(6,*) 'BBBB', nrm2so(nioi43, array(ioi4(3)), 1)
    write(6,*) 'BABA', nrm2so(nioi44, array(ioi4(4)), 1)
    write(6,*) 'AABB', nrm2so(nioi45, array(ioi4(5)), 1)
    write(6,*) 'BBAA', nrm2so(nioi46, array(ioi4(6)), 1)
 elseif(iop==5) then           
    write(6,*) title,'VVVO'    
    write(6,*) 'AAAA', nrm2so(nioi51, array(ioi5(1)), 1)*f2
    write(6,*) 'ABAB', nrm2so(nioi52, array(ioi5(2)), 1)
    write(6,*) 'BBBB', nrm2so(nioi53, array(ioi5(3)), 1)*f2
    write(6,*) 'BABA', nrm2so(nioi54, array(ioi5(4)), 1)
 elseif(iop==6) then           
    write(6,*) title,'VVVV'    
    write(6,*) 'AAAA', nrm2so(nioi61, array(ioi6(1)), 1)*f1
    write(6,*) 'ABAB', nrm2so(nioi62, array(ioi6(2)), 1)
    write(6,*) 'BBBB', nrm2so(nioi63, array(ioi6(3)), 1)*f1
 elseif(iop==111) then 
    write(6,*) title,'_RIVV'
    write(6,*) 'AA', nrm2so(nioiri_vv1, array(ioiri_vv(1)), 1)
    write(6,*) 'BB', nrm2so(nioiri_vv2, array(ioiri_vv(2)), 1)
 elseif(iop==222) then 
    write(6,*) title,'_RIVO'
    write(6,*) 'AA', nrm2so(nioiri_vo1, array(ioiri_vo(1)), 1)
    write(6,*) 'BB', nrm2so(nioiri_vo2, array(ioiri_vo(2)), 1)
 elseif(iop==333) then 
    write(6,*) title,'_RIOO'
    write(6,*) 'AA', nrm2so(nioiri_oo1, array(ioiri_oo(1)), 1)
    write(6,*) 'BB', nrm2so(nioiri_oo2, array(ioiri_oo(2)), 1)
 else 
    write(6,*)'error in iop in printnrm2' 
    stop
 endif 
 return 
 end 
